a=[x+3 for x in range(10)]
print(a)

b=[x+2 for x in range(10) if x%2==0]
print(b)

cells=[(row,col) for row,col in zip(range(10),range(21,30))]
print(cells)

naems=['abc','def','ghi','jkl']
citis={no:city for no,city in zip(range(5),naems)}
print(citis)

#统计每个非空格字符出现的次数
txt='i love u,i love sxt, i love gaoqi'
char_count={c:txt.count(c) for c in txt if c!=' '}  #统计除空格的每个字符个数
print(char_count)

#综合应用
import turtle
p = turtle.Pen()
rs = [x*10 for x in range(1,10)]
my_colors=['red','blue','green','black']
p.width(2)
#画同心圆
for r,i in zip(rs,range(len(my_colors))):
    p.penup()
    p.goto(0,-r)
    p.pendown()
    p.color(my_colors[i])
    p.circle(r)

turtle.done()